to Char Array
fun toCharArray(destination: CharArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = this.length)
Content copied to clipboard
Copies characters from this string builder into the destination character array.
Since Kotlin
1.4
Parameters
destination
the array to copy to.
destination Offset
the position in the array to copy to, 0 by default.
start Index
the beginning (inclusive) of the range to copy, 0 by default.
end Index
the end (exclusive) of the range to copy, length of this string builder by default.
Throws
when the subrange doesn't fit into the destination array starting at the specified destinationOffset, or when that index is out of the destination array indices range.